/**
*	@class Dx10Renderer
*
*	@brief
*
*	@author William McVicar
*/

#pragma once

#ifndef __DX10RENDERER_H_INCLUDED__
#define __DX10RENDERER_H_INCLUDED__

#ifdef DX10

//  Library Includes
#pragma comment( lib, "d3d10" )
#ifdef _DEBUG
#pragma comment( lib, "d3dx10d" )
#else
#pragma comment( lib, "d3dx10" )
#endif

//	SDK Includes
#include <d3d10.h>
#include <D3DX10.h>

//  Local Includes
#include "IRenderer.h"

//  Macros

//  Forward Declarations
class Mesh;

//  Types

//  Constants

//  Prototypes

namespace Protein
{

class Dx10Renderer : public IRenderer
{
	friend class ProteinFramework;

	//Member Functions
public:

	Dx10Renderer();
	virtual ~Dx10Renderer();
	virtual HRESULT Initialise( HWND hWnd );
	virtual void Render();

protected: 

	HRESULT Stuff();
	void Update();

private: 

	//Member Variables
public:

protected: 

private: 

	D3D10_DRIVER_TYPE		m_driverType;
	ID3D10Device*			m_pDevice;
	IDXGISwapChain*			m_pSwapChain;
	ID3D10RenderTargetView*	m_pRenderTargetView;
	ID3D10Texture2D*		m_pDepthStencil;
	ID3D10DepthStencilView* m_pDepthStencilView;

	Mesh*					m_pMesh;

	ID3D10InputLayout*		m_pVertexLayout;

	ID3D10VertexShader*		m_pActiveVertexShader;
	ID3D10PixelShader*		m_pActivePixelShader;

};

#include "Dx10Renderer.inl"

}

#endif //DX10

#endif //__DX10RENDERER_H_INCLUDED__
